package com.zetyun.tiger.connector.read;

import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zetyun.rt.meta.jsonschema.annotation.JsonSchemaTitle;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Set;

@Getter
@Setter
@ToString
@JsonClassDescription("Redis 读取参数类")
public class ReadRedisParameter {

    @JsonSchemaTitle("master名称")
    @JsonProperty(defaultValue = "redis-master")
    private String masterName;

    @JsonSchemaTitle("sentinel地址")
    @JsonProperty(defaultValue = "rdx1:26379")
    private Set<String> sentinels;


    @JsonSchemaTitle("密码")
    @JsonProperty(defaultValue = "Redis6379")
    private String password;

    @JsonSchemaTitle("数据库")
    @JsonProperty(defaultValue = "5")
    private Integer database;

    @JsonSchemaTitle("redis读取bean设置")
    @JsonProperty(defaultValue = "5")
    private List<ReadRedisBean> beans;

    public enum SimpleRedisCommand {
        HGET,
        GET,
    }
}
